Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
TypeError: "MediaSource is not a constructor" on React

MediaSource never emit sourceopen event in React

I came along to this question and used the code provided but i got the error on title. This didn't work on chrome or safari browsers.

    const [mediaSource] = useState(new MediaSource())
    const videoRef = useRef(null)
  
    // component init
    useEffect(() => {
      mediaSource.addEventListener('sourceopen')
    }, [])
  
    // videoRef changes
    useEffect(() => {
      videoRef.current.src = URL.createObjectURL(mediaSource)
    }, [videoRef])
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!